package com.gem.day05;

/**显示器实体类*/
public class Screen {
	private String type;
	private int size;
	private String brand;

	public Screen() {
		super();
	}

	public Screen(String type, int size, String brand) {
		super();
		this.type = type;
		setSize(size);
		this.brand = brand;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public int getSize() {
		return size;
	}

	public void setSize(int size) {
		if (size == 17 || size == 19 || size == 23 || size == 25) {
			this.size = size;
		} else {
			this.size = 17;
		}
	}

	public String getBrand() {
		return brand;
	}

	public void setBrand(String brand) {
		this.brand = brand;
	}

	@Override
	public String toString() {
		return "显示器 [类型=" + type + ", 尺寸=" + size + ", 品牌=" + brand + "]";
	}
}
